﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace RuoVea.GoFastdfs.Common
{
    /// <summary>
    /// 正则校验工具
    /// </summary>
    public class RegexUtill
    {
        /// <summary>
        /// 验证是否是URL
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static bool verifyUrl(String url)
        {
            String regExStr = "[a-zA-z]+://[^\\s]*";
            Regex regex = new Regex(regExStr, RegexOptions.IgnoreCase);
            return regex.IsMatch(url);
        }
    }
}
